copy link properties in attributes

Hello,

I have a module with incoming links, where the links made directly.

Now I will get some properties in my attributes as base to recreate this links with "link by attribute".

So I need the properties of the link like
Neuber - Wed Oct 20 02:44:12 EDT 2010

Re: copy link properties in attributes
Neuber - Wed Oct 20 02:50:45 EDT 2010

Hello,

I have a module with incoming links, where the links made directly.

Now I will get some properties in my attributes as base to recreate this links with "link by attribute".

So I need the properties of the link like
- module name where the link started
- object identifier from the link

What are the names of these link attributes (like f.e. l."Created On")?

Thanks in advance
Ralf

Re: copy link properties in attributes
llandale - Wed Oct 20 15:38:48 EDT 2010

Neuber - Wed Oct 20 02:50:45 EDT 2010
Hello,

I have a module with incoming links, where the links made directly.

Now I will get some properties in my attributes as base to recreate this links with "link by attribute".

So I need the properties of the link like
- module name where the link started
- object identifier from the link

What are the names of these link attributes (like f.e. l."Created On")?

Thanks in advance
Ralf

Let me see if I've got this straight. You want to gather information about incoming links, store that information in some text attribute, and be able to read that information later for use by link-by-attribute.

Information about modules and objects of links are deduced normally and they are not stored in the link attributes. For incoming links, you first need to use a LinkRef loop to find the source modules and load them. THEN use an incoming Link loop. Once you have a handle on the Link itself you can get a handle on the source Module and Object with:

ModuleName_ mSource = source(lnk)
Object      oSource = source(lnk)
if (null mSource or null oSrouce) continue
string NameModFull = fullName(mSource)
string SourceID    = identifier(oSource)

 


The DXL manual has code examples of opening source modules, and then finding links. You could also get a good example by creating a wizard layout looking for source link information.

If you indeed DID care about link attributes, then you can find out what they are by opening the Link Module itself and editing its links. You would see of course "Created By" which you could access via "

 

 

string LinkCreatedBy = lnk."Created By"


You can indeed create new link attributes in the link module, perhaps 'LinkType', and can set and retrieve those values normally:

 

 

string Type = lnk."LinkType"
if (null Type) lnk."LinkType" = "Unknown"


Link attr values are actually stored along with the Object that sources the link, so you'd need to have that source module open Edit, or Shared and the object locked.

 

 

  • Louie